import vue from '@vitejs/plugin-vue'

export default {
  //设置打包路径
  base: "./",
  plugins: [vue()],

  optimizeDeps: {
    include: ["axios"],
  },
  build: {
    target: "modules",
    outDir: "dist",
    assetsDir: "assets",
    minify: "terser", // 混淆器
  },
  // 关闭ESLINT校验工具
  lintOnSave: false,
  server: {
    // host: "localhost", // 本地主机
    // port: 8090, // 端口号的配置
    // open: true, // 自动打开浏览器
    proxy: {
      "/api": {
        target: "http://localhost:8081",
        // target: "http://47.103.118.46:8081",
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, ""),
      },
    },
  },
};